/**       
 * @{#} EvictionConfig.java Create on 2012-3-29 下午3:03:42       
 *       
 * Copyright (c) 2012 by able.       
 */
package __javable.core.util.pool.impl;

/**
 * 
 * 
 * @history <PRE>
 * --------------------------------------------------------- 
 * VERSION       DATE            BY       CHANGE/COMMENT 
 * --------------------------------------------------------- 
 * 1.0           2012-3-29      able         create 
 * ---------------------------------------------------------
 * </PRE>
 * 
 */
public class EvictionConfig {

	private final long idleEvictTime;
	private final long idleSoftEvictTime;
	private final int minIdle;

	public EvictionConfig(long poolIdleEvictTime, long poolIdleSoftEvictTime, int minIdle) {
		if (poolIdleEvictTime > 0) {
			idleEvictTime = poolIdleEvictTime;
		} else {
			idleEvictTime = Long.MAX_VALUE;
		}
		if (poolIdleSoftEvictTime > 0) {
			idleSoftEvictTime = poolIdleSoftEvictTime;
		} else {
			idleSoftEvictTime = Long.MAX_VALUE;
		}
		this.minIdle = minIdle;
	}

	public long getIdleEvictTime() {
		return idleEvictTime;
	}

	public long getIdleSoftEvictTime() {
		return idleSoftEvictTime;
	}

	public int getMinIdle() {
		return minIdle;
	}
}
